/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.portalnahouby.util;

import cz.muni.fi.pa165.portalnahouby.dto.PickerDTO;
import cz.muni.fi.pa165.portalnahouby.entity.Picker;

/**
 *
 * @author xmarica
 */
public class EntityDTOConvertor {

    public static Picker convertPicker(PickerDTO picker) {
        Picker pickerEntity = new Picker();
        pickerEntity.setId(picker.getId());
        pickerEntity.setInfo(picker.getInfo());
        pickerEntity.setIsAdmin(picker.getIsAdmin());
        pickerEntity.setName(picker.getName());
        pickerEntity.setSurname(picker.getSurname());

        return pickerEntity;
    }

    public static PickerDTO convertPicker(Picker picker) {
        PickerDTO pickerDto = new PickerDTO();
        pickerDto.setId(picker.getId());
        pickerDto.setInfo(picker.getInfo());
        pickerDto.setIsAdmin(picker.getIsAdmin());
        pickerDto.setName(picker.getName());
        pickerDto.setSurname(picker.getSurname());

        return pickerDto;
    }
}
